/**
 * Created by xin.zhang on 16/7/6.
 */
import React from 'react';
import { Route,Router ,RoutingContext} from 'react-router';
import App from '../../src/containers/App'
import Main from '../../src/containers/Main'
import Too from '../../src/containers/Too'
import Map from '../../src/containers/MAP'
import AsyncApp from '../../src/containers/AsyncApp'
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
// route 规则：
// - `/list` 显示 `List` 组件
// - `/item/:id` 显示 `Item` 组件

const Routes =(history,navigator)=> {

        var muiTheme = getMuiTheme({
        }, {
                userAgent: typeof window !=='undefined'?window.navigator.userAgent: navigator
        });

        return(
            <MuiThemeProvider muiTheme={muiTheme}>
                    <Router history={ history}>
                            <Route path="/" component={Main}/>
                            <Route path="/about" component={Too}/>
                            <Route path="/app" component={App}/>
                            <Route path="/Asyn" component={AsyncApp}/>
                            <Route path="/map" component={Map}/>

                    </Router>
            </MuiThemeProvider>)
};



//在这里添加
export default Routes